IPropertySetStorage-Compound File
Implementation
The OLE
compound file storage object implementation includes an implementation of both IPropertyStorage,
the interface that manages a single persistent property set, and IPropertySetStorage,
the interface that manages groups of persistent property sets.
To get a
pointer to the compound file implementation of IPropertySetStorage,
first call StgCreateDocfile
When to Use
Call the
methods of IPropertySetStorage to create, open, or delete property sets
in the current compound file property set storage. There is also a method that
supplies a pointer to an enumerator that can be used to enumerate the property
sets in the storage.
Remarks
IPropertySetStorage::Create
Creates a new
property set in the current compound file storage and, on return, supplies an
indirect pointer to the IPropertyStorage compound file implementation.
In this implementation, property sets may be transacted only if
PROPSETFLAG_NONSIMPLE is specified.
IPropertySetStorage::Open
Opens an
existing property set in the current property storage. On return, it supplies
an indirect pointer to the compound file implementation of IPropertyStorage.
IPropertySetStorage::Delete
Deletes a
property set in this property storage.
IPropertySetStorage::Enum
Creates an
object that can be used to enumerate STATPROPSETSTG structures. Each
STATPROPSETSTG structure provides information about a single property set. The
implementation calls the constructor for IEnumSTATPROPSETSTG, which, in turn,
uses the pointer to the IStorage interface to create a STATSTG
Note The
DocumentSummaryInformation property set is special, in that it may have two
property set sections. This property set is described in the OLE Programmer s
Reference, in the section titled The DocumentSummaryInformation Property Set . The second section is
referred to as the User-Defined Properties. Each section is identified with a
unique Format ID, for example FMTID_DocumentSummaryInformation and
FMTID_UserDefinedProperties.
When IPropertySetStorage::Create
is called to create the User-Defined Property Set, the first section is created
automatically. Thus once FMTID_UserDefinedProperties is created,
FMTID_DocumentSummaryInformation need not be created, but can be opened with a
call to IPropertySetStorage::Open. Note that creating the first section
does not automatically create the second section. It is not possible to open
both sections simultaneously.
When IPropertySetStorage::Create
is called to create the User-Defined Property Set, the first section is created
automatically. Thus once FMTID_UserDefinedProperties is created,
FMTID_DocumentSummaryInformation need not be created, but can be opened with a
call to IPropertySetStorage::Open. Note that creating the first section
does not automatically create the second section. It is not possible to open
both sections simultaneously.
Alternately,
when IPropertySetStorage::Delete
Finally, when
IPropertySetStorage::Enum
See Also